package cn.smbms.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.smbms.dao.BillMapper;
import cn.smbms.pojo.Bill;

@Service
public class BillService implements BillServiceI {
	@Resource
	private BillMapper billDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.smbms.service.BillServiceI#getBillListByCondition(java.lang.String,
	 * java.lang.Integer, java.lang.Integer)
	 */
	@Override
	public List<Bill> getBillListByCondition(String productName, Integer providerId, Integer isPayment,
			Integer pageNo) {
		return billDao.getBillListByCondition(productName, providerId, isPayment, pageNo);

	}

	public int count(String productName, Integer providerId, Integer isPayment) {
		return billDao.count(productName, providerId, isPayment);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.smbms.service.BillServiceI#getBillById(java.lang.Integer)
	 */
	@Override
	public Bill getBillById(Integer id) {
		return billDao.getBillById(id);

	}

	// 增加订单
	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.smbms.service.BillServiceI#addBill(cn.smbms.pojo.Bill)
	 */
	@Override
	public int addBill(Bill b) {
		return billDao.addBill(b);

	}

	// 修改订单
	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.smbms.service.BillServiceI#updateBill(cn.smbms.pojo.Bill)
	 */
	@Override
	public int updateBill(Bill b) {
		return billDao.updateBill(b);

	}

	// 删除订单
	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.smbms.service.BillServiceI#deleteBill(java.lang.Integer)
	 */
	@Override
	public int deleteBill(Integer id) {
		return billDao.deleteBill(id);

	}
}
